<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta charset="ISO-8859-1" />
	<meta charset="UTF-8" />
	<link rel="stylesheet" media="screen and (max-width: 640px)" href="resources/css/nghia-small-screen.css" />
	<link rel="stylesheet" media="screen and (min-width: 641px) and (max-width: 800px)" href="resources/css/nghia-small-screen.css" />
	<link rel="stylesheet" media="screen and (min-width: 801px) and (max-width: 1024px)" href="resources/css/nghia-medium-screen.css" />
	<link rel="stylesheet" media="screen and (min-width: 1025px)" href="resources/css/nghia-large-screen.css" />
	<link rel="stylesheet" media="screen and (device-aspect-ratio: 40/71)" href="resources/css/nghia-small-screen.css" />
</h:head>

<!-- Method kiem tra moi khi trang duoc load -->
<f:event listener="#{dangKyTaiKhoanManagedBean.onLoad}"
	type="preRenderView"></f:event>

<h:body>
	<div id="content-outer">
		<div id="content">

			<!--  start page-heading -->
			<div id="page-heading">
				<h1>Đăng ký thành viên</h1>
			</div>

			<br />

			<!-- end page-heading -->
			<h:form id="mainform">
				<div class="offset4">
					<div class="controls-row">
						<div class="control-group">
							<label class="label">Bạn là:</label>
							<br class="line-break"/>							
							<h:selectOneMenu
								value="#{dangKyTaiKhoanManagedBean.kieuThanhVien}"
								onchange="submit()"
								valueChangeListener="#{dangKyTaiKhoanManagedBean.hienThongTinSinhVien}" class="select-them-admin">
								<f:selectItem itemValue="sinhVien" itemLabel="Sinh viên"></f:selectItem>
								<f:selectItem itemValue="chuNhaTro" itemLabel="Chủ nhà trọ"></f:selectItem>
								<f:selectItem itemValue="chuQuanAn" itemLabel="Chủ quán ăn"></f:selectItem>
								<f:selectItem itemValue="congTy" itemLabel="Công ty tuyển dụng"></f:selectItem>
							</h:selectOneMenu>
						</div>
					</div>
					<div class="controls-row ">
						<div class="control-group">
							<label class="label">Tài Khoản:</label>
							<br class="line-break"/>
							<h:inputText value="#{dangKyTaiKhoanManagedBean.username}" class="input-them-admin">
							</h:inputText>
							<h:outputText id="tinhTrangTaiKhoan"
								value="#{dangKyTaiKhoanManagedBean.tinhTrangTaiKhoan}"
								escape="false" />
						</div>
					</div>
					<div class="controls-row ">
						<div class="control-group">
							<label class="label">Password :</label>
							<br class="line-break"/>
							<h:inputSecret value="#{dangKyTaiKhoanManagedBean.password}" class="input-them-admin"/>
						</div>
					</div>
					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.thongTinChung == 'show'}">
						<div class="controls-row ">
							<div class="control-group">
								<label class="label">Họ tên:</label>
								<br class="line-break"/>
								<h:inputText value="#{dangKyTaiKhoanManagedBean.hoTen}" class="input-them-admin"></h:inputText>
							</div>
						</div>
						<div class="controls-row">
							<div class="control-group">
								<label class="label">Giới tính:</label>
								<br class="line-break"/>
								<h:selectOneMenu value="#{dangKyTaiKhoanManagedBean.gioiTinh}" class="select-them-admin">
									<f:selectItem itemValue="Nam" itemLabel="Nam"></f:selectItem>
									<f:selectItem itemValue="Nữ" itemLabel="Nữ"></f:selectItem>
									<f:selectItem itemValue="Khác" itemLabel="Khác"></f:selectItem>
								</h:selectOneMenu>
							</div>
						</div>
					</ui:fragment>
					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.thongTinChung == 'hide'}">
					</ui:fragment>

					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.isCongTy == 'show'}">
						<div class="controls-row ">
							<div class="control-group">
							<label class="label">Tên công ty:</label>
							<br class="line-break"/>
								<h:inputText value="#{dangKyTaiKhoanManagedBean.tenCongTy}" class="input-them-admin"></h:inputText>
							</div>
						</div>
					</ui:fragment>
					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.isCongTy == 'hide'}">
					</ui:fragment>

					<div class="controls-row ">
						<div class="control-group">
							<label class="label">Địa chỉ:</label>
							<br class="line-break"/>
							<h:inputText value="#{dangKyTaiKhoanManagedBean.diaChi}" class="input-them-admin">
							</h:inputText>
						</div>
					</div>

					<div class="controls-row ">
						<div class="control-group">
							<label class="label">Số điện thoại:</label>
							<br class="line-break"/>
							<h:inputText value="#{dangKyTaiKhoanManagedBean.sdt}" class="input-them-admin">
								<f:ajax event="blur" render="tinhTrangSDT" />
							</h:inputText>
							<br class="line-break"/>
							<h:outputText id="tinhTrangSDT"
								value="#{dangKyTaiKhoanManagedBean.tinhTrangSDT}" escape="false" />
						</div>
					</div>
					<div class="controls-row ">
						<div class="control-group">
							<label class="label">Email :</label>
							<br class="line-break"/>
							<h:inputText value="#{dangKyTaiKhoanManagedBean.email}" class="input-them-admin">
								<f:ajax event="blur" render="tinhTrangEmail" />
							</h:inputText>
							<br class="line-break"/>
							<h:outputText id="tinhTrangEmail"
								value="#{dangKyTaiKhoanManagedBean.tinhTrangEmail}"
								escape="false" />
						</div>
					</div>
					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.isSinhVien == 'show'}">
						<div class="controls-row">
							<div class="control-group">
								<label class="label">Ngày sinh:</label>
								<br class="line-break"/>
								<h:selectOneMenu
									value="#{dangKyTaiKhoanManagedBean.ngaySinhNgay}" class="select-them-admin">
									<f:selectItem itemValue="0" itemLabel="Ngày"></f:selectItem>
									<f:selectItem itemValue="01" itemLabel="1"></f:selectItem>
									<f:selectItem itemValue="02" itemLabel="2"></f:selectItem>
									<f:selectItem itemValue="03" itemLabel="3"></f:selectItem>
									<f:selectItem itemValue="04" itemLabel="4"></f:selectItem>
									<f:selectItem itemValue="05" itemLabel="5"></f:selectItem>
									<f:selectItem itemValue="06" itemLabel="6"></f:selectItem>
									<f:selectItem itemValue="07" itemLabel="7"></f:selectItem>
									<f:selectItem itemValue="08" itemLabel="8"></f:selectItem>
									<f:selectItem itemValue="09" itemLabel="9"></f:selectItem>
									<f:selectItem itemValue="10" itemLabel="10"></f:selectItem>
									<f:selectItem itemValue="11" itemLabel="11"></f:selectItem>
									<f:selectItem itemValue="12" itemLabel="12"></f:selectItem>
									<f:selectItem itemValue="13" itemLabel="13"></f:selectItem>
									<f:selectItem itemValue="14" itemLabel="14"></f:selectItem>
									<f:selectItem itemValue="15" itemLabel="15"></f:selectItem>
									<f:selectItem itemValue="16" itemLabel="16"></f:selectItem>
									<f:selectItem itemValue="17" itemLabel="17"></f:selectItem>
									<f:selectItem itemValue="18" itemLabel="18"></f:selectItem>
									<f:selectItem itemValue="19" itemLabel="19"></f:selectItem>
									<f:selectItem itemValue="20" itemLabel="20"></f:selectItem>
									<f:selectItem itemValue="21" itemLabel="21"></f:selectItem>
									<f:selectItem itemValue="22" itemLabel="22"></f:selectItem>
									<f:selectItem itemValue="23" itemLabel="23"></f:selectItem>
									<f:selectItem itemValue="24" itemLabel="24"></f:selectItem>
									<f:selectItem itemValue="25" itemLabel="25"></f:selectItem>
									<f:selectItem itemValue="26" itemLabel="26"></f:selectItem>
									<f:selectItem itemValue="27" itemLabel="27"></f:selectItem>
									<f:selectItem itemValue="28" itemLabel="28"></f:selectItem>
									<f:selectItem itemValue="29" itemLabel="29"></f:selectItem>
									<f:selectItem itemValue="30" itemLabel="30"></f:selectItem>
									<f:selectItem itemValue="31" itemLabel="31"></f:selectItem>
								</h:selectOneMenu>
								<br class="line-break"/>
								<h:selectOneMenu
									value="#{dangKyTaiKhoanManagedBean.ngaySinhThang}" class="select-them-admin">
									<f:selectItem itemValue="0" itemLabel="Tháng"></f:selectItem>
									<f:selectItem itemValue="01" itemLabel="1"></f:selectItem>
									<f:selectItem itemValue="02" itemLabel="2"></f:selectItem>
									<f:selectItem itemValue="03" itemLabel="3"></f:selectItem>
									<f:selectItem itemValue="04" itemLabel="4"></f:selectItem>
									<f:selectItem itemValue="05" itemLabel="5"></f:selectItem>
									<f:selectItem itemValue="06" itemLabel="6"></f:selectItem>
									<f:selectItem itemValue="07" itemLabel="7"></f:selectItem>
									<f:selectItem itemValue="08" itemLabel="8"></f:selectItem>
									<f:selectItem itemValue="09" itemLabel="9"></f:selectItem>
									<f:selectItem itemValue="10" itemLabel="10"></f:selectItem>
									<f:selectItem itemValue="11" itemLabel="11"></f:selectItem>
									<f:selectItem itemValue="12" itemLabel="12"></f:selectItem>
								</h:selectOneMenu>
								<br class="line-break"/>
								<h:selectOneMenu
									value="#{dangKyTaiKhoanManagedBean.ngaySinhNam}" class="select-them-admin">
									<f:selectItem itemValue="0" itemLabel="Năm"></f:selectItem>
									<f:selectItem itemValue="2014" itemLabel="2014"></f:selectItem>
									<f:selectItem itemValue="2013" itemLabel="2013"></f:selectItem>
									<f:selectItem itemValue="2012" itemLabel="2012"></f:selectItem>
									<f:selectItem itemValue="2011" itemLabel="2011"></f:selectItem>
									<f:selectItem itemValue="2010" itemLabel="2010"></f:selectItem>
									<f:selectItem itemValue="2009" itemLabel="2009"></f:selectItem>
									<f:selectItem itemValue="2008" itemLabel="2008"></f:selectItem>
									<f:selectItem itemValue="2007" itemLabel="2007"></f:selectItem>
									<f:selectItem itemValue="2006" itemLabel="2006"></f:selectItem>
									<f:selectItem itemValue="2005" itemLabel="2005"></f:selectItem>
									<f:selectItem itemValue="2004" itemLabel="2004"></f:selectItem>
									<f:selectItem itemValue="2003" itemLabel="2003"></f:selectItem>
									<f:selectItem itemValue="2002" itemLabel="2002"></f:selectItem>
									<f:selectItem itemValue="2001" itemLabel="2001"></f:selectItem>
									<f:selectItem itemValue="2000" itemLabel="2000"></f:selectItem>
									<f:selectItem itemValue="1999" itemLabel="1999"></f:selectItem>
									<f:selectItem itemValue="1998" itemLabel="1998"></f:selectItem>
									<f:selectItem itemValue="1997" itemLabel="1997"></f:selectItem>
									<f:selectItem itemValue="1996" itemLabel="1996"></f:selectItem>
									<f:selectItem itemValue="1995" itemLabel="1995"></f:selectItem>
									<f:selectItem itemValue="1994" itemLabel="1994"></f:selectItem>
									<f:selectItem itemValue="1993" itemLabel="1993"></f:selectItem>
									<f:selectItem itemValue="1992" itemLabel="1992"></f:selectItem>
									<f:selectItem itemValue="1991" itemLabel="1991"></f:selectItem>
									<f:selectItem itemValue="1990" itemLabel="1990"></f:selectItem>
									<f:selectItem itemValue="1989" itemLabel="1989"></f:selectItem>
									<f:selectItem itemValue="1988" itemLabel="1988"></f:selectItem>
									<f:selectItem itemValue="1987" itemLabel="1987"></f:selectItem>
									<f:selectItem itemValue="1986" itemLabel="1986"></f:selectItem>
									<f:selectItem itemValue="1985" itemLabel="1985"></f:selectItem>
									<f:selectItem itemValue="1984" itemLabel="1984"></f:selectItem>
									<f:selectItem itemValue="1983" itemLabel="1983"></f:selectItem>
									<f:selectItem itemValue="1982" itemLabel="1982"></f:selectItem>
									<f:selectItem itemValue="1981" itemLabel="1981"></f:selectItem>
									<f:selectItem itemValue="1980" itemLabel="1980"></f:selectItem>
									<f:selectItem itemValue="1979" itemLabel="1979"></f:selectItem>
									<f:selectItem itemValue="1978" itemLabel="1978"></f:selectItem>
									<f:selectItem itemValue="1977" itemLabel="1977"></f:selectItem>
									<f:selectItem itemValue="1976" itemLabel="1976"></f:selectItem>
									<f:selectItem itemValue="1975" itemLabel="1975"></f:selectItem>
									<f:selectItem itemValue="1974" itemLabel="1974"></f:selectItem>
									<f:selectItem itemValue="1973" itemLabel="1973"></f:selectItem>
									<f:selectItem itemValue="1972" itemLabel="1972"></f:selectItem>
									<f:selectItem itemValue="1971" itemLabel="1971"></f:selectItem>
									<f:selectItem itemValue="1970" itemLabel="1970"></f:selectItem>
									<f:selectItem itemValue="1969" itemLabel="1969"></f:selectItem>
									<f:selectItem itemValue="1968" itemLabel="1968"></f:selectItem>
									<f:selectItem itemValue="1967" itemLabel="1967"></f:selectItem>
									<f:selectItem itemValue="1966" itemLabel="1966"></f:selectItem>
									<f:selectItem itemValue="1965" itemLabel="1965"></f:selectItem>
									<f:selectItem itemValue="1964" itemLabel="1964"></f:selectItem>
									<f:selectItem itemValue="1963" itemLabel="1963"></f:selectItem>
									<f:selectItem itemValue="1962" itemLabel="1962"></f:selectItem>
									<f:selectItem itemValue="1961" itemLabel="1961"></f:selectItem>
									<f:selectItem itemValue="1960" itemLabel="1960"></f:selectItem>
									<f:selectItem itemValue="1959" itemLabel="1959"></f:selectItem>
									<f:selectItem itemValue="1958" itemLabel="1958"></f:selectItem>
									<f:selectItem itemValue="1957" itemLabel="1957"></f:selectItem>
									<f:selectItem itemValue="1956" itemLabel="1956"></f:selectItem>
									<f:selectItem itemValue="1955" itemLabel="1955"></f:selectItem>
									<f:selectItem itemValue="1954" itemLabel="1954"></f:selectItem>
									<f:selectItem itemValue="1953" itemLabel="1953"></f:selectItem>
									<f:selectItem itemValue="1952" itemLabel="1952"></f:selectItem>
									<f:selectItem itemValue="1951" itemLabel="1951"></f:selectItem>
									<f:selectItem itemValue="1950" itemLabel="1950"></f:selectItem>
									<f:selectItem itemValue="1949" itemLabel="1949"></f:selectItem>
									<f:selectItem itemValue="1948" itemLabel="1948"></f:selectItem>
									<f:selectItem itemValue="1947" itemLabel="1947"></f:selectItem>
									<f:selectItem itemValue="1946" itemLabel="1946"></f:selectItem>
									<f:selectItem itemValue="1945" itemLabel="1945"></f:selectItem>
									<f:selectItem itemValue="1944" itemLabel="1944"></f:selectItem>
									<f:selectItem itemValue="1943" itemLabel="1943"></f:selectItem>
									<f:selectItem itemValue="1942" itemLabel="1942"></f:selectItem>
									<f:selectItem itemValue="1941" itemLabel="1941"></f:selectItem>
									<f:selectItem itemValue="1940" itemLabel="1940"></f:selectItem>
									<f:selectItem itemValue="1939" itemLabel="1939"></f:selectItem>
									<f:selectItem itemValue="1938" itemLabel="1938"></f:selectItem>
									<f:selectItem itemValue="1937" itemLabel="1937"></f:selectItem>
									<f:selectItem itemValue="1936" itemLabel="1936"></f:selectItem>
									<f:selectItem itemValue="1935" itemLabel="1935"></f:selectItem>
									<f:selectItem itemValue="1934" itemLabel="1934"></f:selectItem>
									<f:selectItem itemValue="1933" itemLabel="1933"></f:selectItem>
									<f:selectItem itemValue="1932" itemLabel="1932"></f:selectItem>
									<f:selectItem itemValue="1931" itemLabel="1931"></f:selectItem>
									<f:selectItem itemValue="1930" itemLabel="1930"></f:selectItem>
									<f:selectItem itemValue="1929" itemLabel="1929"></f:selectItem>
									<f:selectItem itemValue="1928" itemLabel="1928"></f:selectItem>
									<f:selectItem itemValue="1927" itemLabel="1927"></f:selectItem>
									<f:selectItem itemValue="1926" itemLabel="1926"></f:selectItem>
									<f:selectItem itemValue="1925" itemLabel="1925"></f:selectItem>
									<f:selectItem itemValue="1924" itemLabel="1924"></f:selectItem>
									<f:selectItem itemValue="1923" itemLabel="1923"></f:selectItem>
									<f:selectItem itemValue="1922" itemLabel="1922"></f:selectItem>
								</h:selectOneMenu>
							</div>
						</div>
						<div class="controls-row ">
							<div class="control-group">
								<label class="label">Tên trường :</label>
								<br class="line-break"/>
								<h:inputText value="#{dangKyTaiKhoanManagedBean.truongSV}" class="input-them-admin">
								</h:inputText>
							</div>
						</div>
						<div class="controls-row ">
							<div class="control-group">
								<label class="label">Địa chỉ trường :</label>
								<br class="line-break"/>
								<h:inputText value="#{dangKyTaiKhoanManagedBean.diaChiTruong}" class="input-them-admin">
								</h:inputText>
							</div>
						</div>
						<div class="controls-row ">
							<div class="control-group">
								<label class="label">Mã số sinh viên :</label>
								<br class="line-break"/>
								<h:inputText value="#{dangKyTaiKhoanManagedBean.mssv}" class="input-them-admin">
								</h:inputText>
							</div>
						</div>
					</ui:fragment>
					<ui:fragment
						rendered="#{dangKyTaiKhoanManagedBean.isSinhVien == 'hide'}">
					</ui:fragment>

					<br />

					<div class="controls-row ">
						<h:commandButton value="Đăng ký"
							action="#{dangKyTaiKhoanManagedBean.dangKy}" class="btn btn-primary"></h:commandButton>
						<h:commandButton value="Huỷ bỏ"
							action="#{dangKyTaiKhoanManagedBean.cancel}" class="btn-margin-left btn"></h:commandButton>
					</div>
				</div>
			</h:form>
		</div>
	</div>
</h:body>
</html>